package com.wiener.web.beans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class MenuBean {

	private int index = 4;

	public String redirect(final int a) {
		
		String retorno = null;
		setIndex(a);
		System.out.println("a value " + a);
		switch (a) {
		case 0:
			setIndex(a);
			retorno = "prospecto.faces?faces-redirect=true";
			break;
		case 1:
			setIndex(a);
			retorno = "obligaciones.faces?faces-redirect=true";
			break;
		case 2:
			setIndex(a);
			retorno = "reportes";
			break;

		default:
			setIndex(4);
			retorno = "menu.faces?faces-redirect=true";
			break;
		}
		System.out.println("retorno " + retorno);
		return retorno;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

}
